import 'package:flutter/material.dart';
import 'package:flutter_bxsh/pages/pages_index.dart';
import 'package:provide/provide.dart';
import 'provide/counter.dart';
import 'provide/child_category.dart';
import 'provide/category_product_provide.dart';

void main(){
  var counter = Counter();
  var childCategory = ChildCategory();
  var category_product_provide = Category_Product_Provide();
  var provides = Providers();
  provides
    ..provide(Provider<Category_Product_Provide>.value(category_product_provide))
    ..provide(Provider<ChildCategory>.value(childCategory))
    ..provide(Provider<Counter>.value(counter));
  runApp(ProviderNode(child: MyApp(), providers: provides));
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: '百姓生活+',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primaryColor: Colors.pink
      ),
      home: IndexPage(),
    );
  }
}

